package com.ruoyi.business.api;

import com.ruoyi.business.request.VersionReq;
import com.ruoyi.business.response.VersionRes;
import com.ruoyi.business.service.IAppVersionService;
import com.ruoyi.common.core.domain.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author liutao
 * @version 1.0
 * @description: TODO
 * @date 2024/3/29 12:08
 */

@RestController
@RequestMapping("/api/version")
public class VersionApi {

    @Resource
    private IAppVersionService appVersionService;

    @GetMapping("/check")
    public R<VersionRes> checkAppVersion(VersionReq req) {
        return R.ok(appVersionService.checkAppVersion(req));
    }
}
